<? 
	session_start();
						
	include_once ('core/conn.php');
							
	$db = get_conn();

	$id_location = $_SESSION['session_id_location'];
	
	$pending_invoices = get_pending_invoices_count($id_location);
	if($pending_invoices >0){
		$pending_invoices_link = "<a href='report_payment.php?id_location=".$id_location."&t=ip'>".$pending_invoices."</a>";	
	}else{
		$pending_invoices_link="Ninguna";
	}
	

?>
<link href="css/admin_styles.css" rel="stylesheet" type="text/css" />

<style type="text/css">
<!--
.style13 {
	color: #7F7D19;
	font-family: Geneva, Arial, Helvetica, sans-serif;
}
-->
</style>


<div align="center">
  <h1 class="style13"><br />
    <br />
    <span class="style1" >Bienvenido <?php echo $_SESSION['session_realname']?> </span></h1>
</div>
<table width="80%" border="0" align="center">
  <tr>
    <td colspan="2"><hr size="1"></td>
  </tr>
  <tr>
    <td><strong>Cobros Pendientes</strong></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><?php echo $pending_invoices_link;?></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2"><hr size="1"></td>
  </tr>
  <tr>
    <td><strong>Residentes</strong></td>
    <td><strong>Vehiculos</strong></td>
  </tr>
  <tr>
    <td valign="top"><?php echo get_residents_sumary($_SESSION['session_id_location'],'Y')?></td>
    <td valign="top"><?php echo get_vehicules_sumary($_SESSION['session_id_location'],'N')?></td>
  </tr>
  <tr>
    <td colspan="2"><hr size="1"></td>
  </tr>
  <tr>
    <td><strong>Visitantes</strong></td>
    <td><strong>Bitacora de Acceso</strong></td>
  </tr>
  <tr>
    <td valign="top"><?php echo get_visitors_sumary($_SESSION['session_id_location'],'Y')?></td>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2"><hr size="1"></td>
  </tr>
  <tr>
    <td><strong>Mensajes</strong></td>
    <td><strong>Eventos</strong></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
